﻿<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>MainEvents</name>
    <events>
        <variable constant="0" name="Score" static="0" type="number">0</variable>
        <event-block>
            <conditions>
                <condition id="-2" name="On start of layout" type="System" />
            </conditions>
            <actions>
                <action behavior="Bullet" id="3" name="Set angle of motion" type="Clown">
                    <param id="0" name="Angle">random(360)</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="0" name="On collision with another object" type="Clown">
                    <param id="0" name="Object">Wall</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Bullet" id="4" name="Bounce off object" type="Clown">
                    <param id="0" name="Object">Wall</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="3" name="On touched object" type="Touch">
                    <param id="0" name="Object">Clown</param>
                </condition>
            </conditions>
            <actions>
                <action id="-10" name="Add to" type="System">
                    <param id="0" name="Variable">Score</param>
                    <param id="1" name="Value">1</param>
                </action>
                <action id="-3" name="Set position" type="Clown">
                    <param id="0" name="X">random(75,LayoutWidth - 75)</param>
                    <param id="1" name="Y">random(75,LayoutHeight - 75)</param>
                </action>
                <action id="0" name="Set text" type="ScoreText">
                    <param id="0" name="Text">Score</param>
                </action>
                <action behavior="Bullet" id="3" name="Set angle of motion" type="Clown">
                    <param id="0" name="Angle">random(360)</param>
                </action>
                <action behavior="Bullet" id="0" name="Set speed" type="Clown">
                    <param id="0" name="Speed">Clown.Bullet.Speed +10</param>
                </action>
            </actions>
        </event-block>
    </events>
</c2eventsheet>
